﻿using CsvHelper.Configuration.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yto.Entities;

namespace com.ytocargo.Core.Charts
{
    [Table("YTO_CHART")]
    public class Chart : Entity<string>
    {
        [Column("CHARTID")]
        [StringLength(50)]
        public override string Id { get => base.Id; set => base.Id = value; }

        [Column("AIRPORTICAO")]
        [StringLength(4)]
        public string AirportIcao { get; set; }

        [Column("AIRPORTIATA")]
        [StringLength(3)]
        public string AirportIata { get; set; }

        [Column("CITYNAME")]
        [StringLength(50)]
        public string CityName { get; set; }

        [Column("AIRPORTNAME")]
        [StringLength(50)]
        public string AirportName { get; set; }

        [Column("VALIDFROM")]
        public DateTime? ValidFrom { get; set; }

        [Column("VALIDUNTIL")]
        public DateTime? ValidUntil { get; set; }

        [Column("FILEPATH")]
        [StringLength(200)]
        public string FilePath { get; set; }

        [Column("CHARTNAME")]
        [StringLength(200)]
        public string ChartName { get; set; }

        [Column("FILESIZE")]
        public long FileSize { get; set; }

        [Column("CHARTTYPEEX_CH")]
        [StringLength(50)]
        public string ChartTypeEx_CH { get; set; }

        [StringLength(50)]
        public string MD5 { get; set; }

        [StringLength(50)]
        public string AD_HP_ID { get; set; }

        [StringLength(15)]
        public string PAGE_NUMBER { get; set; }

        [Column(TypeName = "char")]
        [StringLength(10)]
        public string IS_SUP { get; set; }

        [StringLength(50)]
        public string SUP_REF_CHARTID { get; set; }

        [Column(TypeName = "char")]
        [StringLength(10)]
        public string IS_MODIFIED { get; set; }
    }
}
